3.2.68 \(\int \cot ^2(e+f x) (a \sin (e+f x))^m \, dx\) [168]

Optimal. Leaf size=69 \[ -\frac {a \cos (e+f x) \, _2F_1\left (-\frac {1}{2},\frac {1}{2} (-1+m);\frac {1+m}{2};\sin ^2(e+f x)\right ) (a \sin (e+f x))^{-1+m}}{f (1-m) \sqrt {\cos ^2(e+f x)}} \]

[Out]

-a*cos(f*x+e)*hypergeom([-1/2, -1/2+1/2*m],[1/2+1/2*m],sin(f*x+e)^2)*(a*sin(f*x+e))^(-1+m)/f/(1-m)/(cos(f*x+e)
^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2680, 2657} \begin {gather*} -\frac {a \cos (e+f x) (a \sin (e+f x))^{m-1} \, _2F_1\left (-\frac {1}{2},\frac {m-1}{2};\frac {m+1}{2};\sin ^2(e+f x)\right )}{f (1-m) \sqrt {\cos ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^2*(a*Sin[e + f*x])^m,x]

[Out]

-((a*Cos[e + f*x]*Hypergeometric2F1[-1/2, (-1 + m)/2, (1 + m)/2, Sin[e + f*x]^2]*(a*Sin[e + f*x])^(-1 + m))/(f
*(1 - m)*Sqrt[Cos[e + f*x]^2]))

Rule 2657

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[b^(2*IntPart[
(n - 1)/2] + 1)*(b*Cos[e + f*x])^(2*FracPart[(n - 1)/2])*((a*Sin[e + f*x])^(m + 1)/(a*f*(m + 1)*(Cos[e + f*x]^
2)^FracPart[(n - 1)/2]))*Hypergeometric2F1[(1 + m)/2, (1 - n)/2, (3 + m)/2, Sin[e + f*x]^2], x] /; FreeQ[{a, b
, e, f, m, n}, x]

Rule 2680

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Dist[1/a^n, Int[(a*Sin[e +
 f*x])^(m + n)/Cos[e + f*x]^n, x], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[n] &&  !IntegerQ[m]

Rubi steps

\begin {align*} \int \cot ^2(e+f x) (a \sin (e+f x))^m \, dx &=a^2 \int \cos ^2(e+f x) (a \sin (e+f x))^{-2+m} \, dx\\ &=-\frac {a \cos (e+f x) \, _2F_1\left (-\frac {1}{2},\frac {1}{2} (-1+m);\frac {1+m}{2};\sin ^2(e+f x)\right ) (a \sin (e+f x))^{-1+m}}{f (1-m) \sqrt {\cos ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 66, normalized size = 0.96 \begin {gather*} \frac {a \sqrt {\cos ^2(e+f x)} \, _2F_1\left (-\frac {1}{2},\frac {1}{2} (-1+m);\frac {1+m}{2};\sin ^2(e+f x)\right ) \sec (e+f x) (a \sin (e+f x))^{-1+m}}{f (-1+m)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^2*(a*Sin[e + f*x])^m,x]

[Out]

(a*Sqrt[Cos[e + f*x]^2]*Hypergeometric2F1[-1/2, (-1 + m)/2, (1 + m)/2, Sin[e + f*x]^2]*Sec[e + f*x]*(a*Sin[e +
 f*x])^(-1 + m))/(f*(-1 + m))

________________________________________________________________________________________

Maple [F]
time = 0.13, size = 0, normalized size = 0.00 \[\int \left (\cot ^{2}\left (f x +e \right )\right ) \left (a \sin \left (f x +e \right )\right )^{m}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^2*(a*sin(f*x+e))^m,x)

[Out]

int(cot(f*x+e)^2*(a*sin(f*x+e))^m,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2*(a*sin(f*x+e))^m,x, algorithm="maxima")

[Out]

integrate((a*sin(f*x + e))^m*cot(f*x + e)^2, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2*(a*sin(f*x+e))^m,x, algorithm="fricas")

[Out]

integral((a*sin(f*x + e))^m*cot(f*x + e)^2, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \sin {\left (e + f x \right )}\right )^{m} \cot ^{2}{\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**2*(a*sin(f*x+e))**m,x)

[Out]

Integral((a*sin(e + f*x))**m*cot(e + f*x)**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2*(a*sin(f*x+e))^m,x, algorithm="giac")

[Out]

integrate((a*sin(f*x + e))^m*cot(f*x + e)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {cot}\left (e+f\,x\right )}^2\,{\left (a\,\sin \left (e+f\,x\right )\right )}^m \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^2*(a*sin(e + f*x))^m,x)

[Out]

int(cot(e + f*x)^2*(a*sin(e + f*x))^m, x)

________________________________________________________________________________________